package com.team.arms.public_data.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.team.arms.public_data.domain.TroopInfo;
import com.team.arms.public_data.domain.dto.TroopInfoDto;
import com.team.arms.public_data.domain.vo.TroopInfoVo;
import com.team.arms.public_data.mapper.TroopInfoMapper;
import com.team.arms.public_data.service.TroopInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class TroopInfoServiceImpl extends ServiceImpl<TroopInfoMapper, TroopInfo>
    implements TroopInfoService {

    @Autowired
    private TroopInfoMapper troopInfoMapper;

    @Override
    public TroopInfoVo selectById(String id) {
        return troopInfoMapper.selectAllByTroopInfoId(id);
    }

    @Override
    public int insertAll(TroopInfo troopInfo) {
        return troopInfoMapper.insertAll(troopInfo);
    }

    @Override
    public int deleteByListInformationIds(List<String> id) {
        return troopInfoMapper.deleteBatchIds(id);
    }

    @Override
    public int deleteByListInformationId(String id) {
        return troopInfoMapper.deleteById(id);
    }

    @Override
    public List<TroopInfoVo> selectListTroopInfo(TroopInfoDto troopInfoDto) {
        return troopInfoMapper.selectListTroopInfo(troopInfoDto);
    }

    @Override
    public List<TroopInfoVo> selectByFiled(String field, String content) {
        return troopInfoMapper.selectByFiled(field, content);
    }

    @Override
    public List<TroopInfoVo> selectList() {
        return troopInfoMapper.selectList();
    }
}




